package com.itheima.canal.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {

    //定义队列名称 , 广告数据更新
    public static final String AD_UPDATE_QUEUE = "ad_update_queue";
    //商品上下架 , 交换机
    public static final String GOODS_UP_EXCHANGE = "goods_down_exchange";
    //导入商品到索引库 , 队列
    public static final String SEARCH_GOODS_ADD_QUEUE = "search_goods_add_queue";

    /**
     * 声明接收广告更新信息的队列
     *
     * @return
     */
    @Bean
    public Queue queue() {
        return new Queue(AD_UPDATE_QUEUE);
    }
}
